﻿//#define  _CRT_SECURE_NO_WARNINGS 1
//#include<iostream>
//#include<vector>
//#include<queue>
//#include <unordered_map>  
//#include <string>  
//#include<set>
//using namespace std;
//
//
////class Solution {
////public:
////    int minNumberInRotateArray(vector<int> rotateArray) {
////        int left = 0;
////        int right = rotateArray.size() - 1;
////        while (left < right) {
////            int mid = (left + right) / 2;
////            //最小的数字在mid右边
////            if (rotateArray[mid] > rotateArray[right])
////                left = mid + 1;
////            //无法判断，一个一个试
////            else if (rotateArray[mid] == rotateArray[right])
////                right--;
////            //最小数字要么是mid要么在mid左边
////            else
////                right = mid;
////        }
////        return rotateArray[left];
////    }
////};
////int main()
////{
////	int m, n;
////	printf("Enter m,n;");
////	scanf("%d%d", &m, &n);
////	while (m != n) //1
////	{
////		while (m > n) m = m - n; //2
////		while (n > m) n = n - m; //3
////	}
////	printf("m=%d\n", m);
////	return 0;
////}
////int main()
////{
////	char c;
////	int v0 = 0, v1 = 0, v2 = 0;
////		do
////		{
////			switch (c = getchar())
////			{
////			case'a':case'A':
////			case'e':case'E':
////			case'i':case'I':
////			case'o':case'O':
////			case'u':case'U':v1 += 1;
////			default:v0 += 1; v2 += 1;
////			}
////		} while (c != '\n');
////		printf("v0=%d,v1=%d,v2=%d\n", v0, v1, v2);
////		return 0;
////}
//
////int main()
////{
////	char ch[80] = "123abcdEFG*&";
////	int j;
////	puts(ch);
////	for (j = 0; ch[j] != '\0'; j++)
////		if (ch[j] >= 'A' && ch[j] <= 'Z')
////			ch[j] = ch[j] + 'e' - 'E';
////	puts(ch);
////	return 0;
////}
//
////#include <stdio.h>
////int main()
////{
////	char ch;
////	while ((ch = getchar()) != '\n')
////	{
////		if (ch % 2 != 0 && (ch >= 'a' && ch <= 'z'))
////			ch = ch - 'a' + 'A';
////		putchar(ch);
////	}
////	printf("\n");
////	return 0;
////}
////class Solution {
////public:
////    int dominantIndex(vector<int>& nums) {
////        int n = nums.size();
////        int max = 0;
////        int index = 0;
////        for (int i = 0; i < n; i++)
////        {
////            if (nums[i] > max)
////                max = nums[i];
////            index = i;
////        }
////        for (int j = 0; j < n; j++)
////        {
////            if (j == index)
////                continue;
////            if (max < nums[j] * 2)
////            {
////                return -1;
////            }
////        }
////        return index;
////    }
////};
////int main()
////{
////    Solution s;
////    vector<int> nums = { 3,6,1,0 };
////    int ret = s.dominantIndex(nums);
////    cout << ret << endl;
////    return 0;
////}
//
//
//
//
////class Solution {
////public:
////    int firstUniqChar(string s) {
////        unordered_map<char, int> mp;
////        set<char> s1;
////
////        for (char c : s)
////        {
////            mp[c]++;
////        }
////        for (auto c : mp)
////        {
////            if (c.second == 1)
////            {
////                s1.insert(c.first);
////            }
////        }
////        int index = 0;
////        for (char c : s1)
////        {
////            if (s1.count(c))
////            {
////                return index;
////            }
////            ++index;
////        }
////        return 0;
////    }
////};
//
////
////#include<queue>
////
////class Solution {
////public:
////    void rotate(vector<int>& nums, int k) {
////        int n = nums.size() - 1;
////        int num = k;
////        num %= nums.size();
////        queue<int> q;
////        //入队列
////        while (num--)
////        {
////            q.push(nums[n--]);
////        }
////        //挪动数据
////        n = nums.size() - 1;
////        k %= nums.size();
////        int tail = n- k;
////        while (tail >= 0)
////        {
////            nums[n--] = nums[tail--];
////        }
////        //出队列
////        while (!q.empty())
////        {
////            int t = q.front();
////            q.pop();
////            nums[n--] = t;
////        }
////    }
////};
////
////int main()
////{
////    Solution s;
////    vector<int> input = { 1,2 };
////    s.rotate(input,3);
////    return 0;
////}
//﻿int main()
//{
//    priority_queue<int> a;
//    priority_queue<int, vector<int>, greater<int> > c;
//    priority_queue<string> b;
//    for (int i = 0; i < 5; i++)
//    {
//        a.push(i);
//        c.push(i);
//    }
//    while (!a.empty())
//    {
//        cout << a.top() << ' ';
//        a.pop();
//    }
//    cout << endl;
//    while (!c.empty())
//    {
//        cout << c.top() << ' ';
//        c.pop();
//    }
//    cout << endl;
//    b.push("abc");
//    b.push("abcd");
//    b.push("cbd");
//    while (!b.empty())
//    {
//        cout << b.top() << ' ';
//        b.pop();
//    }
//    cout << endl;
//    return 0;
//
//}